1. The Field of the Invention
The present invention relates to the fields of distributed computing systems, client-server computing and object-oriented programming. More specifically, the present invention includes a method and apparatus for creating and installing objects on a distributed object system.
2. The Relevant Art
Object oriented programming methodologies have received increasing attention over the past several years in response to the increasing tendency for software developed using traditional programming methods to be delivered late and over budget. One problem with traditional programming techniques stems from the emphasis placed on procedural models and xe2x80x9clinearxe2x80x9d code that often is extremely difficult to design and maintain. Generally, large programs created using traditional methods are xe2x80x9cbrittlexe2x80x9d, that is, even small changes can affect all elements of the programming code. Thus, minor changes made to the software in response to user demands can require major redesign and rewriting of the entire program.
Object oriented programming strategies tend to avoid these problems because object methodologies focus on manipulating data rather than procedures; thus providing the programmer with a more intuitive approach to modeling real world problems. In addition objects encapsulate related data and procedures so as to hide that information from the remainder of the program by allowing access to the data and procedures only through the object""s interface. Hence changes to the data and or procedures of the object are relatively isolated from the remainder of the program. This provides code that is more easily maintained as compared to code written using traditional methods, as changes to an object""s code do not affect the code in the other objects. In addition, the inherent modular nature of objects allows individual objects to be reused in different programs. Thus, programmers can develop libraries of xe2x80x9ctried and truexe2x80x9d objects that can be used over and over again in different applications. This increases software reliability while decreasing development time, as reliable programming code may be used repeatedly.
The object metaphor in distributed systems is a useful technique as it separates the object""s interface from its implementation; thus allowing software designers to take advantage of the functionalities of various objects available to them without having to worry about the details of the object""s implementation. The programmer need only be aware of the object""s interface. In addition, object oriented distributed systems allow for multiple implementations of a single interface, which interface may reside on different computing platforms that have been connected through a network. Thus, a programmer working on one machine of a network may make a call to an object about which the programmer has no detailed knowledge with the confidence that at the appropriate time that the remote object will be accessed and return its data so that the programmers code will function properly. Such a system thus maximizes the inherent advantages of object oriented methodologies by taking full advantage of their modularity and encapsulation.
Attempts to provide such facilities have been made using object oriented distributed systems that are based upon a client-server model, in which object-servers provide interfaces to clients that make requests of the object-servers. Typically in such systems, these servers are objects consisting of data and associated methods. The clients obtain access to the functionalities of the object-servers by executing calls on them, which calls are mediated by the distributed system.
When the object-server receives the call it executes the appropriate method and transmits the result back to the object-client. The client and object-server communicate through an Object Request Broker (ORB) which is used to locate the various distributed objects and establish communications therebetween.
Although the advantages to employing object oriented programming methodologies through distributed object systems are significant, there remain major hurdles to their implementation. An extremely difficult hurdle stems from the increased demand on object programmers to provide the functionalities in their code necessary to make their objects perform properly on the distributed object system. For example, objects in the distributed object system must be capable of activation and deletion by the ORB in response to uncoordinated and often concurrent requests from clients. Objects must also be capable of responding to multiple simultaneous requests, i.e., they must be capable of supporting multithreaded operation.
Unfortunately, most programming objects currently in existence are not written to support the functionalities required for placement on a distributed operating system. Thus, the implementation of existing objects on such systems would require much retooling of the existing object software. This would lessen the advantages afforded by object programming methodologies as existing programming objects would not be easily available in distributed object systems.
An additional difficulty with implementing distributed objects on distributed object systems arises from the need to inform the system of the presence of the objects at the time of their installation. Since all client requests are processed through the object request broker, or ORB, the ORB must have knowledge of the existence of the objects. Furthermore, it is preferable in distributed object systems to have functionalities that allow for a clear distinction between objects that are in the development phase and objects that are available to users on the distributed object system generally. Providing such awareness poses various difficulties for the programmer who must bear the burden of implementing a wide variety of xe2x80x9chousekeepingxe2x80x9d operations to take advantage of the benefits of the distributed object system.
The full promise of object oriented methodologies, especially the advantages afforded by their modularity, have yet to be achieved. In particular, it would be highly desirable to allow programmers and other users the ability to create and install distributed objects in a relatively transparent fashion so that objects created in different programming languages and/or objects residing on different computing platforms can be made available on distributed object systems without extensive modification of programming code or placing an undue burden on the user. Thus, it would be preferable to have a system capable of handling the formation and installation of distributed objects that minimizes the need for the programmer or the user to be familiar with the details of distributed object systems. More preferable is a system in which programming objects that are not distributed can be transformed into a distributed object relatively transparently with respect to the programmer or the user.
The present invention includes a method and apparatus for forming and installing distributed objects in a distributed object system. Using the method and apparatus of the invention distributed objects can be formed and installed on distributed object systems without extensive modification to the objects and without the requirement that the programmer or user of the object have an extensive familiarity with providing support for distributed object systems in the programming code of their objects. Thus, using the method and apparatus of the invention objects can be brought onto a distributed object system with greater efficiency and ease than heretofore available.
In one embodiment, the present invention provides a computer-implemented method for creating a distributed object suitable for use on a distributed object system. The method of the invention includes the steps of first providing interface files describing interfaces contained in the distributed object, providing implementation files describing distributed object implementations, providing servant class files describing a servant class of object implementations, and optionally providing data schema files describing persistent data. The interface, implementation, servant class and persistent data schema files are compiled under computer control to produce compiled header and source files corresponding to the interface, implementation, servant class and persistent data schema files, in which the source files corresponding to the implementation files include template source files. Finally, the header and source files are linked under computer control with the wrapper class so that the wrapper class has an inheritance relationship with respect to the servant class wherein the wrapper class is derived from the servant class to create thereby the distributed object.
In one embodiment, the method further includes the steps of discriminating between a distributed object intended for development and a distributed object intended for deployment. The header and source files for distributed objects intended for development are linked with a development object file. Distributed objects that are intended for deployment are packaged and an interface registry file is created for registration with the object request broker mechanism of the distributed object system.
In another embodiment, the present invention includes a computer system for producing a distributed object suitable for use on a distributed object system. The computer system of the invention includes a compiling mechanism for compiling interface definition files including object interface definitions, implementation files describing distributed object implementations and servant class files of developer-defined object implementations to produce corresponding header and source files. The computer system further includes a linking mechanism to link the source and header files produced by the compiling mechanism with a wrapper class containing functions and services for operating the distributed object on the distributed object system. The linker is effective to establish an inheritance relationship between the wrapper class and the servant class in which the wrapper class is derived from the servant class. In one embodiment, the computer system of the invention includes a compiling mechanism and a linking mechanism effective to produce a template file containing a prototypical version of the servant class.
In still another embodiment the present invention includes a distributed object suitable for use on a distributed object system. The distributed object includes a call to a developer-written function that is contained in a servant class containing developer-written code. In addition, the distributed object of the invention further includes wrapper statements contained in a wrapper class of objects. The wrapper statements include invocations of services for supporting the operation of the distributed object on the distributed object system. The wrapper class has an inheritance relationship with the servant class wherein the wrapper class is derived from the developer-written servant class of objects.
In another embodiment, the servant class of the distributed object of the invention inherits from an interface class of interfaces to services contained in the wrapper class. A preferred embodiment is one wherein the distributed object is located in the memory of a computer in a distributed object system wherein the distributed object of the invention communicates with other distributed objects through an object request broker mechanism. In one embodiment, the services provided by the wrapper class provide an interface mechanism between the developer-written methods contained in the servant class and the object request broker mechanism.
Further advantages and features of the present invention will become apparent when the detailed description below is read in conjunction with the accompanying figures.